package ba07_allTest;

import org.springframework.stereotype.Component;

/**
 * @author HLF
 * @version V1.0
 * @package ba07_allTest
 * @date 2021/10/18 19:44
 */
@Component(value = "otherServiceImpl")
public class OtherServiceImpl implements OtherService {
    @Override
    public void doFirst() {
        System.out.println("执行了OtherServiceImpl的doFirst方法！");
    }

    @Override
    public void doSecond(String name, Integer age) {
        System.out.println("执行了OtherServiceImpl的doSecond方法！");
    }

    @Override
    public String doThird(String name, Integer age) {
        System.out.println("执行了OtherServiceImpl的doThird方法！");
        Student student = new Student(name, age);
        return student.getName();
    }

    @Override
    public Student doFourth(String name, Integer age) {
        System.out.println("执行了OtherServiceImpl的doFourth方法！");
        return null;
    }
}
